<?php
App::import('Vendor', 'Reporting.GigaDataset');
App::import('Vendor', 'Reporting.GigaChart');

$dataset = new GigaDataSeries;

$dataset->setProperty("title", __("Daily Hits Summary"));
$dataset->setProperty("y_axis", __("Unique Hits"));
$dataset->setProperty("x_axis", __("Date"));

$hits = array_reverse($hits, true);
foreach($hits as $date => $count)
{
	$dataset->add($count, date('j M', strtotime($date)));
}

$chart = new GigaChart($dataset);
echo $chart->render('column', array('labelOverlapAvoidanceGap' => 3));
?>
